<form id="pagerForm" method="post" action="{:U($module_name.'/'.$action_name."?model=".$model)}">
    <input type="hidden" name="pageNum" value="{$pageNum}" />
    <input type="hidden" name="numPerPage" value="{$numPerPage}" />
    <input type="hidden" name="orderField" value="{$orderField}" />
    <input type="hidden" name="orderDirection" value="{$orderDirection}" />
</form>
<div class="pageHeader">
    <form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
    			<input type="hidden" name="g" value="{$group_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
       <input type ='hidden' name='selproid' value="{$selproid}" />
	    <div class="searchBar">
            <ul class="searchContent">
          	<li style="width:160px;">
						<input name="starttime" id="stime" class="date" type="text" value="{$con['starttime']}"/><a class="inputDateButton" href="javascript:;">选择</a>
					  </li>
					<li style="width:160px;">
						<input name="endtime" id="etime" class="date" type="text" value="{$con['endtime']}"/><a class="inputDateButton" href="javascript:;">选择</a>
					</li>
       										
                <li style="padding-top:0;"><div class="buttonActive"><div class="buttonContent"><button type="submit">搜索</button></div></div></li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent">
<div class="panelBar">
		<ul class="toolBar">
			<li>
				<a target="selectedTodo" rel="ids[]" href="{:U('Assetsreport/piechart',array('ftodo'=>'xfcz'))}"  class="add"><span>饼状图</span></a>
				<a target="selectedTodo" rel="ids[]" href="{:U('Assetsreport/barchart',array('ftodo'=>'xfcz'))}"  class="add"><span>柱状图</span></a>
				<a href="{:U('Assetsreport/piechart',array('todo'=>'$todo'))}" target="navTab" rel='piechart_xfcz' id="forstautss" style="display:none;">消费充值统计(图)</a>
			</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width='250px;'>操作类型</th>
				<th width='100px;'>科目</th>
				<th width='300px;'>数额</th>
				<!--<th width='100px;'>换算比例</th>-->
				<th>操作</th>					
			</tr>
		</thead>
		<tbody>	
		<volist name='list' id='vo'>	
			<tr target="sid_user" rel="9">
				<td><input name="ids[]" class="chpro" value="{$vo['changtype']}|{$vo['subject']}" type="checkbox"></td>
				<td>{$changtype[$vo['changtype']]}</td>
				<td>{$vo.subject}</td>
				<td>{$vo['value']}</td>
				<!--<td>{$subject[$vo['subject']]}</td>	-->
				<td><a href="{:U('Money/assets',array('subject'=>$vo['subject'],'changtype'=>$vo['changtype'],'time'=>1,'starttime'=>$con['t_start'],'endtime'=>$con['t_end']))}" target="navTab" rel=''>明细</a></td>	
			</tr>
			
		</volist>	
			{if $coupon}
			<tr target="sid_user" rel="9">
				<td><input name="ids[]" class="chpro" value="coupon|xfcz" type="checkbox"></td>
				<td>赠送优惠券</td>
				<td>CV</td>
				<td>{$coupon['total']}</td>
				<!--<td>{$subject[$vo['subject']]}</td>	-->
				<td><a href="{:U('Money/coupon',array('time'=>1,'stime'=>$con['t_start'],'etime'=>$con['t_end']))}" target="navTab" rel=''>明细</a></td>	
			</tr>
			{/if}
		</tbody>
	</table>
	<include file="Index:pages" />
</div>

<script>	
function ajaxTodo(url){
	$.ajax({
		type: 'POST',
		url: url,
		dataType: "json",
		cache: false,
		success: function(){ $("a", $(".j-num")).parent('.selected').children().click();return 0; },
		error: DWZ.ajaxError
	});
}

if(typeof('showFace')!="function"){
function navTabAjaxDone(json){
	var time = "";
		if($("#stime").val()!=""){
			 time += "&starttime="+$("#stime").val();
		}
		if($("#etime").val()!=""){
			 time += "&endtime="+$("#etime").val();
		}
    if (json.action == 'piechart'){		
		var todo = json.ftodo;
		var url = "{:U('Assetsreport/piechart',array('todo'=>'piechart'))}" + '&ids='+json.ids +'&ftodo='+json.ftodo+time;
		$("#forstautss").attr('href',url);
        $("#forstautss").click();
    }else if (json.action == 'barchart'){
		var todo = json.ftodo;
		var url = "{:U('Assetsreport/barchart',array('todo'=>'barchart'))}" + '&ids='+json.ids +'&ftodo='+json.ftodo+time;
		$("#forstautss").attr('href',url);
        $("#forstautss").click();
	}
	else {
		DWZ.ajaxDone(json);
		navTab.reload();
	}
}

}
</script>
